package com.example.ujsfish.model.poolMap;

import androidx.room.Entity;
import androidx.room.PrimaryKey;

//池塘顶点类
@Entity
public class PoolPoint {
    @PrimaryKey
    private int point_id;

    private int pool_id;
    //true为顶点，false为障碍点
    private boolean pointType;
    private String point_X;
    private String point_Y;

    public PoolPoint(int pool_id, boolean pointType, String point_X, String point_Y) {

        this.pool_id = pool_id;
        this.pointType = pointType;
        this.point_X = point_X;
        this.point_Y = point_Y;
    }


//    public PoolPoint(int pool_id, boolean pointType, String point_X, String point_Y) {
//        this.pool_id = pool_id;
//        this.pointType = pointType;
//
//        if(point_X.charAt(0) == 'E'){
//            this.point_Y = Float.parseFloat(point_X.substring(1));
//        }else if (point_X.charAt(0) == 'W'){
//            this.point_Y = -Float.parseFloat(point_X.substring(1));
//        }
//
//        if(point_Y.charAt(0) == 'N'){
//            this.point_X = -Float.parseFloat(point_Y.substring(1));
//        }else if (point_Y.charAt(0) == 'S'){
//            this.point_X = Float.parseFloat(point_Y.substring(1));
//        }
//    }

    public int getPoint_id() {
        return point_id;
    }

    public void setPoint_id(int point_id) {
        this.point_id = point_id;
    }

    public int getPool_id() {
        return pool_id;
    }

    public void setPool_id(int pool_id) {
        this.pool_id = pool_id;
    }

    public boolean isPointType() {
        return pointType;
    }

    public void setPointType(boolean pointType) {
        this.pointType = pointType;
    }

    public String getPoint_X() {
        return point_X;
    }

    public void setPoint_X(String point_X) {
        this.point_X = point_X;
    }

    public String getPoint_Y() {
        return point_Y;
    }

    public void setPoint_Y(String point_Y) {
        this.point_Y = point_Y;
    }
}
